package com.cheng.dreams.sample.net;


import com.cheng.dreams.sample.entity.response.BaseResponse;
import com.cheng.dreams.sample.entity.response.HomeBannerEntity;
import com.cheng.dreams.sample.entity.response.PayEntity;

import java.util.Map;

import io.reactivex.Observable;
import retrofit2.http.Field;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.POST;

/**
 * CreateTime: 2016-03-30上午9:42
 * Author: cheng
 * Description:
 */
public interface ApiService {

    @FormUrlEncoded
    @POST("api/pay/alipay/getOrderString.ns")
    Observable<BaseResponse<PayEntity>> getPay(@Field("_data") String _data);

    @GET("api/banner/home.ns")
    Observable<BaseResponse<HomeBannerEntity>> getHomeBanner();

    /**
     * 登录
     * @param params
     * @return
     */
    @FormUrlEncoded
    @POST("api/user/login.ns")
    Observable<BaseResponse> setLogin(@FieldMap Map<String, Object> params);


}
